GXNewCurve
You can use theGXNewCurve
function to create a new curve shape and initialize its geometry.
gxShape GXNewCurve(const gxCurve *data);
data
- A pointer to the initial curve geometry.
- function result
- A reference to the new curve shape.
DESCRIPTION
TheGXNewCurve
function creates a copy of the default curve shape, sets the owner count of the copy to 1, initializes its geometry with the values in thedata
parameter, and returns a reference to it as the function result.Although this function creates a copy of the default curve shape, it does not create a copy of the default curve's style, ink, or transform objects. The new curve shape returned by this function contains references to same style, ink, and transform as the default curve shape.
SPECIAL CONSIDERATIONS
If no error occurs, theGXNewCurve
function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about creating and disposing of shapes.If an error occurs, this function returns
nil
as the function result.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory parameter_is_nil (debugging version) SEE ALSO
For an example that uses this function, see "Creating and Drawing Curves" beginning on page 2-41.For a discussion of curves and the default curve shape, see "Curve Shapes" beginning on page 2-18.
For a description of the
gxCurve
structure, see page 2-105.To create a new curve shape without specifying an initial geometry, see the description of the
GXNewShape
function in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.To set the geometry of an existing curve shape, see the description of the
GXSetCurve
function on page 2-126.To draw a curve geometry without creating a curve shape, see the description of
GXDrawCurve
on page 2-159. To draw a curve shape, see the description ofGXDrawShape
in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help